[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                         InstallUserFont function

  DECLARATION:  InstallUserFont(Name : String);

      PURPOSE:  Adds a new font to the BGI system

         UNIT:  Graph

  RESULT TYPE:  Integer

      REMARKS:  The parameter, Name is the filename of a stroked font.
                The integer value returned is the font ID number that can be
                passed to SetTextStyle.  If the font table is full, a 0 is
                returned.

      EXAMPLE:  Uses Graph;

                Var
                   Driver, Mode, TestFont : Integer;

                Begin
                   TestFont := InstallUserFont('FontFile');
                   If (GraphResult <> 0) Then
                      Begin
                         WriteLn(Error installing Font);
                         ReadLn;
                      End;
                   Driver := Detect;
                   InitGraph(Driver, Mode, '');
                   If (GraphResult <> 0) Then
                      Halt(1);
                   SetTextStyle(TestFont, HorizDir, 2);
                   ...
                End.

See Also: SetTextStyle
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson